<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>策略模式</title>
  <link href="./favicon.ico" rel="shortcut icon">
</head>
<body>
  <ul>
    <li>不同策略(执行方式)分开处理</li>
    <li>避免大量的if...else或switch...case</li>
    <li>不同策略分开处理而不是混合在一起，符合开放封闭原则(OCP)</li>
  </ul>
</body>
</html>